﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserManagement.aspx.cs" Inherits="Sbook.AdminIstrator.WebForm1" %>
<%@ Register src="ControlAdmin/MenuLeft.ascx" tagname="MenuLeft" tagprefix="uc1" %>

<%@ Register src="ControlAdmin/ucLogout.ascx" tagname="ucLogout" tagprefix="uc2" %>
<%@ Register Src="ControlAdmin/MenuTop.ascx" TagName="MenuTop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
    .table {width:550px}
    .table td { border:1px solid #CCFFFF; text-align:left;font-size:14px;padding-left:5px}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>USER MANAGEMENT</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddaccordion.js"></script>
<script type="text/javascript">
    ddaccordion.init({
        headerclass: "submenuheader", //Shared CSS class name of headers group
        contentclass: "submenu", //Shared CSS class name of contents group
        revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
        mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
        collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
        defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
        onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
        animatedefault: false, //Should contents open by default be animated into view?
        persiststate: true, //persist state of opened contents within browser session?
        toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
        togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
        animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
        oninit: function (headers, expandedindices) { //custom code to run when headers have initalized
            //do nothing
        },
        onopenclose: function (header, index, state, isuseractivated) { //custom code to run whenever a header is opened or closed
            //do nothing
        }
    })
</script>
<script src="js/jquery.jclock-1.2.0.js.txt" type="text/javascript"></script>
<script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>
<script type="text/javascript">

    $(document).ready(function () {
        $('.ask').jConfirmAction();
    });
	
</script>
<script type="text/javascript">
    $(function ($) {
        $('.jclock').jclock();
    });
</script>

<script language="javascript" type="text/javascript" src="js/niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="css/niceforms-default.css" />

</head>
<body>
    <form id="form1" runat="server">
<div id="main_container">

	<div class="header">
    <div class="logo"><a href="Default.aspx"><img src="../images/logo_sach.gif" width="130" height="100" border="0" /></a></div>
    
    <div class="right_header">Welcome Admin | <uc2:ucLogout 
            ID="ucLogout1" runat="server" />
        </div>
    <div class="jclock"></div>
    </div>
    
    <div class="main_content">
    
    <uc1:MenuTop runat="server" ID="menuTop" />
          
    <div class="center_content">  
    
    
    <uc1:MenuLeft ID="MenuLeft1" runat="server" />
    
    
    <div class="right_content"> 
        <asp:Repeater ID="rpUser" runat="server" onitemcommand="rpUser_ItemCommand">
        <HeaderTemplate>
        <table id="rounded-corner" summary="2007 Major IT Companies' Profit">
            <thead>
    	        <tr>
                    <%--<th scope="col" class="rounded-company">Item No</th>--%>
                    <th scope="col" class="rounded-company">Username</th>
                    <th scope="col" class="rounded">Fullname</th>
                    
                    <th scope="col" class="rounded">Prove Number</th>
                    <th scope="col" class="rounded">Email</th>
                    <th scope="col" class="rounded">Phone</th>
                    <th scope="col" class="rounded">Class</th>
                    <th scope="col" class="rounded">University</th>
                    <th scope="col" class="rounded">Status</th>
                    <%--<th scope="col" class="rounded">Remark</th>--%>
                    <th scope="col" class="rounded">Edit</th>
                    <th scope="col" class="rounded-q4">Delete</th>
                </tr>
            </thead>
        </HeaderTemplate>
         <ItemTemplate>
        
    	   <tbody> <tr>
                <td ><%#Eval("Username") %><asp:Label ID="lblUId" runat="server" Text='<%#Eval("UId") %>' Visible="False"></asp:Label></td>
                <td ><%#Eval("Fullname") %> </td>
                
                <td >
                    <%#Eval("Provenumber") %> </td>
                <td ><%#Eval("Email") %></td>
                <td >
                    <%#Eval("Phone") %> </td>
                <td ><%#Eval("Class") %> </td>
                <td>
                    <%#Eval("University") %>  </td>
                <td >
                    <asp:Label ID="lblStatus" runat="server" Text='<%#Eval("Status") %>' Visible="false"></asp:Label>
                    <asp:DropDownList ID="drdlStatus" runat="server" AutoPostBack="true" onselectedindexchanged="drdlStatus_SelectedIndexChanged"> 
                        <asp:ListItem Value="0">Enable</asp:ListItem>
                        <asp:ListItem Value="1">Disable</asp:ListItem>
                    </asp:DropDownList>
                </td>
               
                <td >
                    <asp:LinkButton ID="lbtEdit" runat="server" CausesValidation="false" CommandName="Edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"UId")%>'><img src="images/user_edit.png" alt="" title="" border="0" /></asp:LinkButton></td>
                <td ><a href='DeleteAction.aspx?UId=<%# Eval("UId") %>'  class="ask"><img src="images/trash.png" alt="" title="" border="0" /></a></td>
            </tr>  </tbody>
            
         </ItemTemplate> 
         <FooterTemplate>
             
     </table>
         </FooterTemplate>
        </asp:Repeater>
       
        <div class="pagination">
                       <%--<th scope="col" class="rounded-company">Item No</th>--%>
                        <p>
                            <asp:Literal ID="ltrPaging" runat="server" Text = ""></asp:Literal></p>
                        <p></p>
    <asp:Panel ID="pnDetail" runat="server">
                      
     <table class="table">
        <tr>
            <td colspan="2" style="font-size: x-large; color: #CC0000; font-weight: bold;text-align:left;">Edit User</td>
            
        </tr>
         <tr>
            <td colspan="2" style="border-width:0px;"></td>
            
        </tr>
         <tr>
            <td colspan="2" style="border-width:0px;">
                
             </td>
            
        </tr>
        <tr>
            <td>Fullname</td>
            <td>
                <asp:TextBox ID="txtName" runat="server" Width="300px"></asp:TextBox>
                <asp:Label ID="lblUserName" runat="server" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>Prove Number</td>
            <td><asp:TextBox ID="txtProve" runat="server" Width="300px"></asp:TextBox>
                <asp:Label ID="lblPass" runat="server" Visible="False"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>Email</td>
            <td><asp:TextBox ID="txtEmail" runat="server" Width="300px"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="txtEmail" ErrorMessage="Invalid email" ForeColor="Red" 
                    ValidationExpression="[a-zA-Z]+[a-zA-Z_0-9.]+@[a-zA-Z0-9]+[a-zA-Z](.[a-zA-Z]{2,4}){1,2}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>Phone</td>
            <td><asp:TextBox ID="txtPhone" runat="server" Width="300px"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtPhone" ErrorMessage="Invalid Phone" ForeColor="Red" 
                    ValidationExpression="[0-9]{8,11}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>Address</td>
            <td><asp:TextBox ID="txtAddress" runat="server" Width="300px"></asp:TextBox></td>
         
        </tr>
         <tr>
            <td>Class</td>
            <td><asp:TextBox ID="txtClass" runat="server" Width="300px"></asp:TextBox>
                <asp:Label ID="lblAdmin" runat="server" Visible="False"></asp:Label>
             </td>
        </tr>
        <tr>
            <td>University</td>
            <td><asp:TextBox ID="txtUniversity" runat="server" Width="300px"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Status</td>
            <td>
                <asp:RadioButtonList ID="rblStatus" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0">Enable</asp:ListItem>
                    <asp:ListItem Value="1">Disable</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnSave" runat="server" Text="Save" Width="100px" 
                    onclick="btnSave_Click" /></td>
            <td>
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" Width="100px" 
                    onclick="btnCancel_Click" CausesValidation="False" /></td>
        </tr>
       
    </table>
    </asp:Panel>
                    </div>
    </div>
    
    
    <!-- end of right content-->
            
                    
  </div>   <!--end of center content -->               
                    
                    
    
    
    <div class="clear"></div>
    </div> <!--end of main content-->
	
    
    <div class="footer">
    
    	<div class="left_footer">SBooks 2012<a href="http://indeziner.com"></a></div>
    </div>

</div>		
    </form>
</body>
</html>

